﻿<UserControl
    x:Class="Srk.BetaseriesApiApp.Views.UserBadges"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    mc:Ignorable="d" 
    d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal">
            <TextBox Text="{Binding Username, UpdateSourceTrigger=PropertyChanged}" Width="180" Margin="4" />
            <Button Content="Go" Command="{Binding GetBadgesCommand}" Margin="4" />
            <TextBlock Text="{Binding StatusMessage}" Margin="4" />
        </StackPanel>

        <ListView Grid.Row="2" ItemsSource="{Binding Badges}" Height="220">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Svc Key" DisplayMemberBinding="{Binding ServiceName}" />
                    <GridViewColumn Header="Lib Key" DisplayMemberBinding="{Binding InternalType}" />
                    <GridViewColumn Header="Name" DisplayMemberBinding="{Binding TranslatedName}" />
                    <GridViewColumn Header="Description" DisplayMemberBinding="{Binding TranslatedDescription}" />
                </GridView>
            </ListView.View>
        </ListView>
    </Grid>
</UserControl>
